package com.esdk.sql.orm;

public class ColumnMetaData implements CharSequence{
  public ColumnMetaData(String name,Class clazz){
    this.name=name;
    this.clazz=clazz;
  }

  public ColumnMetaData(String name,Class clazz,String dataType,int length,boolean nullable,Object defval,String remark){
    this.name=name;
    this.dataType=dataType;
    this.length=length;
    this.nullable=nullable;
    this.remark=remark;
    this.defaultValue=defval;
    this.clazz=clazz;
  }
  public String name;
  public Class clazz;
  public String dataType;
  public int length;
  public boolean nullable;
  public String remark;
  public Object defaultValue;

  @Override
  public int length(){
    return this.length;
  }

  @Override
  public char charAt(int index){
    return name.charAt(index);
  }

  @Override
  public CharSequence subSequence(int start,int end){
    return name.substring(start,end);
  }

  public String toString(){
    return this.name;
  }
}
